<extend name="public/body" />
<block name="body">
    <div class="special_box row" style="margin-top:5px;">
        <?php
            if(!$list){
        ?>
        <div class="col-12 text-center" style="padding:10rem 0;">
            <img src="__IMG__/tips/create_project.png">
        </div>
        <?php
            }
            foreach($list as $key=>$row){
        ?>
        <div class="col-lg-3 col-md-4 col-6">
            <div class="card">
                <div class="card-body">
                    <h6 class="navbar card-title">
                        <a class="title ellipsis" href="<?=url('Index/detail',['id'=>$row['id']])?>"><?=$row['title']?></a>
                        <ul class="navbar-nav float-right">
                            <li class="nav-item dropdown">
                                <a class="nav-link " href="javascript:void(0);" id="project_menu_<?=$row['id']?>" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></a>
                                <div class="dropdown-menu" aria-labelledby="project_menu_<?=$row['id']?>">
                                    <?php
                                        if(session("member_id")==$row["member_id"]){
                                    ?>
                                    <a class="dropdown-item" href="<?=url('Index/edit',['id'=>$row['id']])?>">设置</a>
                                    <a class="dropdown-item" href="<?=url('Index/del',['project_id'=>$row['id']])?>">删除</a>
                                    <?php
                                        }else{
                                    ?>
                                    <a class="dropdown-item" href="<?=url('Index/quit',['project_id'=>$row['id']])?>">退出</a>
                                    <?php
                                        }
                                    ?>
                                </div>
                            </li>
                        </ul>
                    </h6>
                    <div class="card-subtitle clearfix">
                        <span class="creater"><?=$row['nickname']?></span>
                        <span class="time" style="margin-left:10px;"><?=date('Y/m/d',strtotime($row['add_time']))?></span>
                        <!--<span class="float-right badge badge-<?=session("member_id")==$row["member_id"]?'primary':'secondary'?>"><?=session("member_id")==$row["member_id"]?'自己':'已加入'?></span>-->
                    </div>
                </div>
            </div>
        </div>
        <?php
            }
        ?>
    </div>
    <div class="pages">
        <?=$page?>
    </div>
</block>